//
//  DataHandler.h
//  ForAddSDK
//
//  Created by admin on 2018/1/9.
//  Copyright © 2018年 admin. All rights reserved.
//

#import <Foundation/Foundation.h>

#define DEL_SPACE(str) [str stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]

#define COLUMNID_GAME_ID @"gameID"
#define COLUMNID_LOCAL_SVN_PATH @"localSvnPath"
#define COLUMNID_LOCAL_CACHE_PATH @"localCachePath"
#define COLUMNID_PACK_SVN_PATH @"packSvnPath"
#define COLUMNID_PACK_CACHE_PATH @"packCachePath"
#define COLUMNID_GAME_START_VERSION @"gameStartVersion"
#define COLUMNID_LOCAL_TRUNK_SVN_PATH @"localTrunkSvnPath"
#define COLUMNID_CANCEL @"cancel"

#define COLUMNID_ARRAY @[@"gameID",@"localSvnPath",@"localCachePath",@"packSvnPath",@"packCachePath",@"gameStartVersion",@"localTrunkSvnPath",@"cancel"]

#define DefaultDataChangeNotification @"DefaultDataChangeNotification"
#define SelectedGameIDChangeNotification @"SelectedGameIDChangeNotification"
#define BundleIDAndGameVersionChangeNotification @"BundleIDAndGameVersionChangeNotification"

@interface DataHandler : NSObject

@property (strong, nonatomic) NSString *svnPath;
@property (strong, nonatomic) NSString *projectSubPath;
@property (strong, nonatomic) NSString *pictureSubPath;
@property (strong, nonatomic) NSString *originPlatform;
@property (strong, nonatomic) NSString *workPlatform;
@property (assign, nonatomic) BOOL isPathOK;
@property (strong, nonatomic) NSString *targetName;

+ (instancetype)shareInstance;
+ (void)refreshInit;
- (NSArray *)getValueArray;
+ (NSString *)runScript:(NSString *)scriptName type:(NSString *)type launchPath:(NSString *)launchPath arguments:(NSArray *)arguments;
+ (NSString *)runScriptAtPath:(NSString *)path launchPath:(NSString *)launchPath arguments:(NSArray *)arguments;
+ (BOOL)exitPath:(NSString *)path;
+ (BOOL)isExistPlatformProject:(NSString *)platform;
+ (BOOL)isexistPictureFolder:(NSString *)platform;
+ (NSMutableArray *)getDefaultValuesArray;
+ (void)saveDefaultValuesArray:(NSArray *)array;
+ (NSDictionary *)getDefaultValuesWithGameID:(NSString *)gameID;
@end
